#ifndef MAINWIN_H
#define MAINWIN_H

#include <QtGui/QMainWindow>
#include <QSystemTrayIcon>
#include <QCloseEvent>
#include <QMenu>
#include "lircthread.h"
namespace Ui {
    class mainWin;
}

class mainWin : public QMainWindow {
    Q_OBJECT
    Q_DISABLE_COPY(mainWin)
public:
	mainWin(QStringList argv,QWidget *parent = 0);
    virtual ~mainWin();
public slots:
	void remKey(keyData k);
	void remRepeat(keyData k);
	void saveKey();
	void toggleWin();
	void trayClicked(QSystemTrayIcon::ActivationReason reason);
protected:
    virtual void changeEvent(QEvent *e);

private:
    Ui::mainWin *m_ui;
	lircThread *lth;
	QSystemTrayIcon * icon;
	QMenu *iconMenu;
	void closeEvent(QCloseEvent * ev);
	void setupTray();
};

#endif // MAINWIN_H
